package com.xuduo.amd.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
@AllArgsConstructor
public class PageObject<T> implements Serializable {
    private static final long serialVersion = 7217246153671958459L;
    private  long rowCount;
    private List<T> records;
    private long pageCount;
    private Integer pageSize;
    private long pageCurrent;
    public PageObject(){};
    public PageObject(Long rowCount,List<T> records,Integer pageSize,Long pageCurrent){
        super();
        this.rowCount=rowCount;
        this.records=records;
        this.pageSize=pageSize;
        this.pageCurrent=pageCurrent;
        this.pageCount=(rowCount-1)/pageSize+1;
    }




}
